package com.huilai.platform.country_platform.core;

/**
 * 作者：洪霓
 * 日期：2023/3/3
 * 注释：
 */
public enum TypeEnum {
    ZERO(1,"检举控告"),
    ONE(2,"群众诉求"),
    TWO(3,"批评建议");

    private Integer status;
    private String statusString;

    TypeEnum(Integer status, String statusString){
        this.status = status;
        this.statusString = statusString;
    }

    public static String  getStringByStatus(Integer status) {
        for (TypeEnum typeEnum : TypeEnum.values()) {
            if (typeEnum.status.equals(status)) {
                return typeEnum.statusString;
            }
        }
        return "null";
    }

    public static Integer getStatusByString(String statusString){
        for (TypeEnum typeEnum : TypeEnum.values()){
            if (typeEnum.statusString.equals(statusString)){
                return typeEnum.status;
            }
        }
        return -1;
    }
}
